const inquirer = require('inquirer')
const { framework, frameworkUrl } = require('../../config')
const downloadFun = require('./download')

const myAction = async (project, args) => {
	// 命令行的执行逻辑代码
	console.log(project, args)
	const answer = await inquirer.prompt([
		{
			type: 'list',
			name: 'framework',
			choices: framework,
			message: '请选择你所使用的框架'
		}
	])
	downloadFun(frameworkUrl[answer.framework], project)
}

module.exports = myAction
